import component from './index.vue'

export default function (Vue) {
    const Constructor = Vue.extend(component)
    const Instance = new Constructor();
    Instance.$mount()
    document.body.appendChild(Instance.$el)
    Vue.prototype.$dialog = (obj) => {
        Object.keys(obj.options).forEach(item => {
            Instance.options[item] = obj.options[item]
        })
        if (obj.options.dialogVisible === undefined) {
            Instance.options.dialogVisible = true;
        }
        Instance.render = obj.render;
        Instance.btns = obj.btns;
    }
}